package com.lulu.lottiesample;

import android.os.Handler;
import android.os.Looper;

/**
 * @author zhanglulu on 2019/10/23.
 * for
 */
public class Utility {
    public static void runOnUiThread(RunOnUiThread listener) {
        if (listener != null) {
            Handler handler = new Handler(Looper.getMainLooper());
            handler.post(new Runnable() {
                @Override
                public void run() {
                    listener.runOnUiThread();
                }
            });
        }
    }

    public interface RunOnUiThread {
        void runOnUiThread();
    }
}
